package cn.edu.hust.sse.software7.class3.entities;

import java.io.Serializable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 * This is the category of the product, the administrator can add or delete
 * product category if there are no product of this category, else eBusiness
 * will list all the products of the category user can search product by
 * category.
 * 
 * @author mason
 * 
 */
@PersistenceCapable(identityType=IdentityType.APPLICATION)
public class EBCategory implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long categoryId;
	@Persistent
	private String categoryName;
	@Persistent
	private String categoryDesc;
	@Persistent
	private Long superCategoryId;
	
	public EBCategory(String categoryName, String categoryDesc) {
		super();
		this.categoryName = categoryName;
		this.categoryDesc = categoryDesc;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public String getCategoryDesc() {
		return categoryDesc;
	}

	public void setCategoryDesc(String categoryDesc) {
		this.categoryDesc = categoryDesc;
	}

	public Long getSuperCategoryId() {
		return superCategoryId;
	}

	public void setSuperCategoryId(Long superCategoryId) {
		this.superCategoryId = superCategoryId;
	}

	public Long getCategoryId() {
		return categoryId;
	}
}
